import request from '@/utils/request'

// 查询考试列表
export function listExamTask(query) {
  return request({
    url: '/exam/examTask/list',
    method: 'get',
    params: query
  })
}

// 查询考试详细
export function getExamTask(id) {
  return request({
    url: '/exam/examTask/' + id,
    method: 'get'
  })
}

// 新增考试
export function addExamTask(data) {
  return request({
    url: '/exam/examTask',
    method: 'post',
    data: data
  })
}

// 修改考试
export function updateExamTask(data) {
  return request({
    url: '/exam/examTask',
    method: 'put',
    data: data
  })
}

// 删除考试
export function delExamTask(id) {
  return request({
    url: '/exam/examTask/' + id,
    method: 'delete'
  })
}

// 导出考试
export function exportExamTask(query) {
  return request({
    url: '/exam/examTask/export',
    method: 'get',
    params: query
  })
}
// 下载导入模板
export function importTemplate() {
  return request({
    url: '/exam/examTask/importTemplate',
    method: 'get'
  })
}

//批量生成
export function genExamTask(data) {
  return request({
    url: '/exam/examTask/gen',
    method: 'post',
    data: data
  })
}
